<template>
  <div>
    <van-cell
      center
      :title="name"
      :label="author + ' - ' + name"
      @click="$router.push({
        path: '/comment',
        query: {
          id
        }
      })"
    > 
      <!-- 右侧图标 -->
      <template #right-icon>
        <van-icon @touchstart="playFn" name="play-circle-o" class="play-icon" size="0.6rem" />
      </template>
    </van-cell>
  </div>
</template>

<script>
export default {
  props: {
    name: String, // 歌名
    author: String, // 作者
    id: Number // 歌曲id
  },
  methods: {
    playFn() {
      // console.log("点击了播放");
      this.$router.push({
        path: "/play",
        query: {
          id: this.id
        }
      })
    }
  },
};
</script>

<style lang="less" scoped>
.play-icon {
    font-size: 21px;
    line-height: inherit;
}
</style>
